<?php
/**
 * 系统配文件
 * 所有系统级别的配置
 */
return array(
    /* 数据库配置 */
    'DB_TYPE' => 'mysql',    // 数据库类型
    'DB_HOST' => '${MYSQL.ADMIN_CLCW.CLCWDB.HOST}', //服务器地址
    'DB_PORT' => '${MYSQL.ADMIN_CLCW.CLCWDB.PORT}', //端口
    'DB_NAME' => '${MYSQL.ADMIN_CLCW.CLCWDB.NAME}', //服务器地址
    'DB_USER' => '${MYSQL.ADMIN_CLCW.CLCWDB.USER}', //用戶
    'DB_PWD' => '${MYSQL.ADMIN_CLCW.CLCWDB.PWD}',  //密碼
    'DB_PREFIX' => 'au_',  // 数据库表前缀

    /*车型数据库配置  */
    'DB_CAR_MODEL' => [
        'DB_TYPE' => 'mysql',    // 数据库类型
        'DB_HOST' => '${MYSQL.ADMIN_CLCW.CLCW_CM_DB.HOST}', //服务器地址
        'DB_PORT' => '${MYSQL.ADMIN_CLCW.CLCW_CM_DB.PORT}', //端口
        'DB_NAME' => '${MYSQL.ADMIN_CLCW.CLCW_CM_DB.NAME}', //服务器地址
        'DB_USER' => '${MYSQL.ADMIN_CLCW.CLCW_CM_DB.USER}', //用戶
        'DB_PWD' => '${MYSQL.ADMIN_CLCW.CLCW_CM_DB.PWD}',  //密碼
        'DB_PREFIX' => 'clcw_',  // 数据库表前缀
    ],
    
    /*车型库需要同步的数据库配置*/
    'DB_TO_SYNC' => array('AUCTION','CHJR'),
    'AUCTION' => array(
        'DB_TYPE' => 'mysql',    // 数据库类型
        'DB_HOST' => '${MYSQL.ADMIN_CLCW.CLCWDB.HOST}', //服务器地址
        'DB_PORT' => '${MYSQL.ADMIN_CLCW.CLCWDB.PORT}', //端口
        'DB_NAME' => '${MYSQL.ADMIN_CLCW.CLCWDB.NAME}', //服务器地址
        'DB_USER' => '${MYSQL.ADMIN_CLCW.CLCWDB.USER}', //用戶
        'DB_PWD' => '${MYSQL.ADMIN_CLCW.CLCWDB.PWD}',  //密碼
        'DB_PREFIX' => 'au_',  // 数据库表前缀
    ),
    'CHJR' => array(
        'DB_TYPE' => 'mysql',
        'DB_HOST' => '${MYSQL.ADMIN_CLCW.CHJR.HOST}',
        'DB_PORT' => '${MYSQL.ADMIN_CLCW.CHJR.PORT}',
        'DB_NAME' => '${MYSQL.ADMIN_CLCW.CHJR.NAME}',
        'DB_USER' => '${MYSQL.ADMIN_CLCW.CHJR.USER}',
        'DB_PWD' => '${MYSQL.ADMIN_CLCW.CHJR.PWD}',
        'DB_PREFIX' => 'ch_',
    ),

    /*车来车往数据库*/
    'DB_CLCW' => array(
        'DB_TYPE' => 'mysql', // 数据库类型
        'DB_HOST' => '${MYSQL.ADMIN_CLCW.CLCW.HOST}', // 服务器地址
        'DB_PORT' => '${MYSQL.ADMIN_CLCW.CLCW.PORT}', // 端口
        'DB_NAME' => '${MYSQL.ADMIN_CLCW.CLCW.NAME}', // 数据库名
        'DB_USER' => '${MYSQL.ADMIN_CLCW.CLCW.USER}', // 用户名
        'DB_PWD' => '${MYSQL.ADMIN_CLCW.CLCW.PWD}', // 密码
        'DB_PREFIX' => 'clcw_', // 数据库表前缀
        'DB_CHARSET' =>  'utf8mb4',
    ),

    /* redis配置 */
    'REDIS_HOST' => '${REDIS.NODE1.HOST}',
    'REDIS_PORT' => '${REDIS.NODE1.PORT}',

    //Redis Session配置
    'SESSION_AUTO_START' => true,    // 是否自动开启Session
    'SESSION_TYPE' => 'Redis',    //session类型
    'SESSION_PERSISTENT' => 1,        //是否长连接(对于php来说0和1都一样)
    'SESSION_CACHE_TIME' => 1,        //连接超时时间(秒)
    'SESSION_EXPIRE' => 86400,        //session有效期(单位:秒) 0表示永久缓存
    'SESSION_PREFIX' => 'admin:sess:',        //session前缀
    'SESSION_REDIS_HOST' => '${REDIS.NODE1.HOST}', //分布式Redis,默认第一个为主服务器
    'SESSION_REDIS_PORT' => '${REDIS.NODE1.PORT}',           //端口,如果相同只填一个,用英文逗号分隔
    'SESSION_REDIS_AUTH' => '',    //Redis auth认证(密钥中不能有逗号),如果相同只填一个,用英文逗号分隔

    /* memcache配置*/
    'MEMCACHE_HOST' => '${MEMCACHE.NODE1.HOST}',
    'MEMCACHE_PORT' => '${MEMCACHE.NODE1.PORT}',
);
